package com.zmn.brs.business.impl.engineer;

import com.zmn.brs.business.interfaces.engineer.EngineerRecordBService;
import com.zmn.brs.model.query.record.EngineerRecordCustom;
import com.zmn.brs.model.query.record.EngineerRecordCustomQuery;
import com.zmn.brs.persistence.interfaces.record.engineer.EngineerRecordDao;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 描述： 工程师监控数据
 *
 * @author chongw
 * @since 2021-07-05 15:59
 */
@Slf4j
@Service
public class EngineerRecordBServiceImpl implements EngineerRecordBService {

    @Resource
    EngineerRecordDao engineerRecordDao;

    @Override
    public List<EngineerRecordCustom> listEngineerRecordPageByQuery(EngineerRecordCustomQuery query) {
        query.setTotalCount(engineerRecordDao.countRecordPageByQuery(query));
        return engineerRecordDao.listRecordPageByQuery(query);
    }
}
